from fastapi import APIRouter
from agent.agent_conversationalchatagent import agent_executor
from pydantic import BaseModel

agent = APIRouter()


@agent.get('/model/v1/model_detail')
def get_model_detail(prompt: dict):
    print("prompt--》", prompt)
    response = agent_executor.invoke({"input": prompt['content']})
    print('response-->', response)
    yield response['output']
